package demoMod.invincibleOne.skins;

import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.blights.TimeMaze;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import demoMod.invincibleOne.InvincibleOneMod;
import demoMod.invincibleOne.cards.invincible.*;

import java.util.ArrayList;

import static demoMod.invincibleOne.InvincibleOneMod.getResourcePath;

public class TheWatcher extends Skin {
    public TheWatcher() {
        super(6, "the_watcher");
        atlasIdle = "Idle";
    }

    @Override
    public void load() {
        portrait = new Texture(getResourcePath("charSelect/portrait6.png"));
        shoulder1 = new Texture(InvincibleOneMod.getResourcePath("char/shoulder6_1.png"));
        shoulder2 = new Texture(InvincibleOneMod.getResourcePath("char/shoulder6_2.png"));
        sprite = new Texture(InvincibleOneMod.getResourcePath("char/character1.png"));
        for (int i = 0; i < 3; i++) {
            deathCG[i] = new Texture(getResourcePath("char/victory2_" + (i+1) + ".png"));
        }
    }

    @Override
    public void onGameStart() {
        new TimeMaze().instantObtain(AbstractDungeon.player, AbstractDungeon.player.blights.size(), true);
    }

    public ArrayList<AbstractCard> getStartingCards() {
        ArrayList<AbstractCard> ret = new ArrayList<>();
        ret.add(new Rushdown());
        ret.add(new Wallop());
        ret.add(new Tantrum());
        ret.add(new Ragnarok());
        return ret;
    }

    public ArrayList<String> getStartingDeck() {
        ArrayList<String> ret = new ArrayList<>();
        ret.add(Rushdown.ID);
        ret.add(Rushdown.ID);
        ret.add(Rushdown.ID);
        ret.add(Rushdown.ID);
        ret.add(Rushdown.ID);
        ret.add(Wallop.ID);
        ret.add(Wallop.ID);
        ret.add(Wallop.ID);
        ret.add(Wallop.ID);
        ret.add(Wallop.ID);
        ret.add(Tantrum.ID);
        ret.add(Tantrum.ID);
        ret.add(Tantrum.ID);
        ret.add(Tantrum.ID);
        ret.add(Tantrum.ID);
        ret.add(Ragnarok.ID);
        ret.add(Ragnarok.ID);
        if (InvincibleOneMod.seriousLevel[CardCrawlGame.saveSlot] >= 6) {
            ret.add(OutOfThinAir.ID);
        }
        return ret;
    }
}
